package utils;

import org.junit.jupiter.api.Test;
import org.springframework.util.Base64Utils;

import java.nio.charset.StandardCharsets;

public class Others {

    @Test
    public void encode(){
        String val="122221QE1";
        String s = Base64Utils.encodeToUrlSafeString(val.getBytes(StandardCharsets.UTF_8));
        String val2="33313EQHJ";
        String s2 = Base64Utils.encodeToUrlSafeString(val2.getBytes(StandardCharsets.UTF_8));
        System.out.println(s); // MTIyMjIxUUUx
        System.out.println(s2);// MzMzMTNFUUhK

    }
}
